# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-pycountry
_pkgname=pycountry
pkgver=20.7.3
pkgrel=0
pkgdesc="ISO country, subdivision, language, currency and script definitions and their translations"
url="https://pypi.org/project/pycountry"
arch="noarch"
license="LGPL-2.1-only"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-country py-pycountry" # Backwards compatibility
provides="py-country=$pkgver-r$pkgrel py-pycountry=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$builddir/src" pytest-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="df88a34307a4275267a7f3af282b73ca5e762c49ad158bfcd39b97c5d852bf045bcfe72351fc6f232c55003a7c4b0a04801eb562ba65ed5d599bd45b2bd3bc58  pycountry-20.7.3.tar.gz"
